package com.gitee.ywj1352.mybatis;

import java.lang.reflect.Proxy;

/**
 * @author wenjie.yang on 2019/4/15.
 */
public class Configuration {

    public <T> T getMapper(Class<T> clazz,Sqlsession sqlsession) {
        return (T)Proxy.newProxyInstance(this.getClass().getClassLoader(),
                new Class[]{clazz},
                new MapperProxy(sqlsession));
    }
}
